import React from 'react';
import {
  IndexRedirect,
  Route,
} from 'react-router';
import './ui/components/index';

import App from './ui/App';
import NoteSideBar from './ui/NoteSideBar';
import NoteSelector from './ui/NoteSelector';
import NotePaper from './ui/NotePaper';
import NoteEmptyPaper from './ui/NoteEmptyPaper';

import settingsRoutes from './ui/settings/routes';

export default (
  <Route path="/" component={App}>
    <IndexRedirect to="/b-recent"/>
    <Route path="b-:bookId" components={{sidebar: NoteSideBar,selector: NoteSelector, paper: NoteEmptyPaper}}/>
    <Route path="b-:bookId/n-:noteId" components={{sidebar: NoteSideBar, selector: NoteSelector, paper: NotePaper}}/>
    {settingsRoutes}
  </Route>
)